﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ReportsAndStatistics/ReportsAndStatisticsPages.master" AutoEventWireup="true" CodeBehind="ReportByProductTypesDetails.aspx.cs" Inherits="WebApp.ReportsAndStatistics.ReportByProductTypesDetails" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="scriptCssContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" runat="server">
    <h3 style="text-align:center;">CHI TIẾT THỐNG KÊ DOANH SỐ SỬA CHỬA THEO LOẠI SẢN PHẨM</h3>
    
    <fieldset title="Thông tin thống kê">
        <legend>Thông tin thống kê</legend>
        <table style="width:100%; border:0px;">
            <tr>
                <td class="ISoft_LabelTitle">Loại sản phẩm: </td>
                <td class="ISoft_Input">
                    <asp:Label runat="server" ID="lblProductTypeName" Text=""></asp:Label>
                </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="ISoft_LabelTitle" style="width:15%;">Thống kê từ ngày: </td>
                <td class="ISoft_Input" style="width:35%;">
                    <asp:Label runat="server" ID="lblReportDateFrom" Text=""></asp:Label>
                </td>

                <td class="ISoft_LabelTitle" style="width:15%;">đến ngày: </td>
                <td class="ISoft_Input" style="width:35%;">
                    <asp:Label runat="server" ID="lblReportDateTo" Text=""></asp:Label>
                </td>
            </tr>
        </table>
    </fieldset>

    <fieldset title="Danh sách đã sửa xong">
        <legend>Danh sách đã sửa xong</legend>
        <table style="width:100%; border:0px;">
            <tr>
                <td colspan="4">
                    <telerik:RadGrid ID="grdResult" runat="server" AllowPaging="true" AllowSorting="true" PageSize="<%$ Resources:Strings, PageSize%>"
                                    EnableEmbeddedSkins="true" 
                        Skin="<%$ Resources:Strings, Skin%>"
                        onitemcreated="grdResult_ItemCreated" 
                        onneeddatasource="grdResult_NeedDataSource" 
                        onitemdatabound="grdResult_ItemDataBound">
                        <HeaderStyle Wrap="true" Font-Bold="true" HorizontalAlign="Center" Font-Size="10pt" />
                        <AlternatingItemStyle Font-Names="arial,tahoma,sans-serif" Font-Size="12px" BorderStyle="Solid"/>                
                        <ItemStyle Font-Names="arial,tahoma,sans-serif" Font-Size="12px" BorderColor="#2299DD"/>
                    
                        <PagerStyle  HorizontalAlign="Right" Mode="NextPrevNumericAndAdvanced"
                                    PagerTextFormat="Chọn trang: {4} &amp;nbsp;|&amp;nbsp; Trang hiện tại: {0} / {1}, mẫu tin: {2} - {3} / {5}." AlwaysVisible="True"/>
                    
                        <MasterTableView AutoGenerateColumns="false" NoMasterRecordsText="<%$ Resources:Strings, NoMasterRecordsText%>">
            
                            <Columns>
                                <telerik:GridTemplateColumn HeaderText="STT">
                                    <HeaderStyle Width="30px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label style="text-align:center" id="lblSTT" runat="server" Text='<%# grdResult.CurrentPageIndex*grdResult.PageSize + grdResult.Items.Count+1 %>' />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>

                                <telerik:GridBoundColumn DataField="RepairingTicketID" UniqueName="RepairingTicketID" Visible="false">
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn DataField="VisibleCheckWarranty" UniqueName="VisibleCheckWarranty" Visible="false">
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn DataField="IsValidWarranty" UniqueName="IsValidWarranty" Visible="false">
                                </telerik:GridBoundColumn>

                                <telerik:GridTemplateColumn HeaderText="Tên KH" UniqueName="FullName" SortExpression="FullName">
                                    <ItemTemplate>
                                        <asp:HyperLink runat="server" ID="hplFullName" Text='<%# DataBinder.Eval(Container.DataItem, "FullName") %>'></asp:HyperLink>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="10%"/>
                                </telerik:GridTemplateColumn>

                                <telerik:GridBoundColumn HeaderText="Địa Chỉ" DataField="Address" UniqueName="Address" SortExpression="Address">
                                    <ItemStyle HorizontalAlign="Left" Width="15%"/>
                                </telerik:GridBoundColumn>
                
                                <telerik:GridBoundColumn HeaderText="Model" DataField="Model" UniqueName="Model" SortExpression="Model">
                                    <ItemStyle HorizontalAlign="Left" Width="10%"/>
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn HeaderText="Ngày Nhận" DataField="CreatedDate" UniqueName="CreatedDate" SortExpression="CreatedDate">
                                    <ItemStyle HorizontalAlign="Center" Width="10%"/>
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn HeaderText="Người Nhận" DataField="ReceivingEmployee" UniqueName="ReceivingEmployee" SortExpression="ReceivingEmployee">
                                    <ItemStyle HorizontalAlign="Center" Width="10%"/>
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn HeaderText="Ngày Sửa Xong" DataField="RepairedDate" UniqueName="RepairedDate" SortExpression="RepairedDate">
                                    <ItemStyle HorizontalAlign="Center" Width="10%"/>
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn HeaderText="Người Sửa" DataField="Repairer" UniqueName="Repairer" SortExpression="Repairer">
                                    <ItemStyle HorizontalAlign="Center" Width="10%"/>
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn HeaderText="Loại Sửa Chữa" DataField="RepairingTypeName" UniqueName="RepairingTypeName" SortExpression="RepairingTypeName">
                                    <ItemStyle HorizontalAlign="Left" Width="10%"/>
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn HeaderText="Tiền Thu Khách Hàng" DataField="Cost" UniqueName="Cost" SortExpression="Cost">
                                    <ItemStyle HorizontalAlign="Center" Width="10%"/>
                                </telerik:GridBoundColumn>

                                <telerik:GridTemplateColumn HeaderText="Xác Nhận BH" UniqueName="ColCheckWarranty">
                                    <ItemTemplate>
                                        <asp:Image runat="server" ID="imgCheckWarranty" ImageAlign="Middle" ImageUrl="~/images/NoCheckWarranty.gif"/>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="30px" />
                                </telerik:GridTemplateColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                </td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle ISoft_TotalItem" style="width:20%;">Số lượng: </td>
                <td class="ISoft_Input" style="width:30%;">
                    <asp:Label runat="server" ID="lblTotalQuantity" Text="" CssClass="ISoft_TotalItem"></asp:Label>
                </td>

                <td class="ISoft_LabelTitle ISoft_TotalItem" style="width:20%;">Tổng tiền thu khách hàng: </td>
                <td class="ISoft_Input" style="width:30%;">
                    <asp:Label runat="server" ID="lblTotalCost" Text="" CssClass="ISoft_TotalItem"></asp:Label>
                </td>
            </tr>
        </table>
    </fieldset>

    <table style="width:100%; border:0px">
        <tr>
            <td class="ISoft_ButtonsRow" colspan="4">
                <telerik:RadButton ID="btnBack" runat="server" 
                    Skin="<%$ Resources:Strings, Skin%>" Text="<%$ Resources:Strings, Back%>" 
                    Width="100px" onclick="btnBack_Click"></telerik:RadButton>
            </td>
        </tr>
    </table>
</asp:Content>
